/*
 * @Author: 鹿佰冲
 * @Date: 2018-05-16 10:46:40
 * @Last Modified by: mikey.zhaopeng
 * @Last Modified time: 2018-07-25 15:34:48
 */
import request from "../utils/request";

export const register = opt =>
  request("/api/register", {
    username: opt.username,
    password: opt.password,
    role: opt.role,
    head: opt.head
  });

export const login = opt =>
  request.post("/api/login", {
    username: opt.username,
    password: opt.password
  });
